package baseTest;

public class searchMatrix {
    public static void main(String[] args) {

    }

    public boolean process(int[][] matrix,int target){
        for (int i = 0; i < matrix.length; i++) {
            if (matrix[i][matrix[i].length-1] < target){
                continue;
            }
            for (int j = 0;j<matrix[0].length && matrix[i][j] > target; j++) {
                if (matrix[i][j] == target){
                    return true;
                }
            }
        }
        return false;
    }
}
